
//
//  MenuCenterCell.m
//  BusinessMarket
//
//  Created by Michael Li on 2018/11/29.
//  Copyright © 2018年 Michael Li. All rights reserved.
//

#import "MenuCenterCell.h"
#import "ProviceModel.h"
#import "HomeModel.h"
#import "CityModel.h"
@interface MenuCenterCell()
@property (weak, nonatomic) IBOutlet UILabel *titleL;
@property (weak, nonatomic) IBOutlet UILabel *lineL;
@end
@implementation MenuCenterCell

- (void)setIndexPath:(NSIndexPath *)indexPath
{
    _indexPath = indexPath;
//    self.cellBtn.tag = indexPath.row;
}
-(instancetype)initWithCoder:(NSCoder *)aDecoder
{
    if (self = [super initWithCoder:aDecoder]) {
//        self.contentView.backgroundColor = [UIColor clearColor];
        
    }
    return self;
}
- (void)setProviceModel:(ProviceModel *)proviceModel
{
    _proviceModel = proviceModel;
    if (!self.provinceShow) {
        proviceModel.show = NO;
    }
    if (proviceModel.show) {
        self.titleL.textColor = kOrangeBg;
        self.lineL.hidden = NO;
    }else {
        self.titleL.textColor = kLabel102Color;
        self.lineL.hidden = YES;
    }
    self.titleL.text = proviceModel.State;
}
- (void)setProvinceShow:(BOOL)provinceShow
{
    _provinceShow = provinceShow;
}
- (void)setHomeModel:(HomeModel *)homeModel
{
    _homeModel = homeModel;
    if (homeModel.show) {
        self.titleL.textColor = kOrangeBg;
        self.lineL.hidden = NO;
    }else {
        self.titleL.textColor = kLabel102Color;
        self.lineL.hidden = YES;
    }
    self.titleL.text = homeModel.content;
}
- (void)setUsuallyModel:(HomeModel *)usuallyModel
{
    _usuallyModel = usuallyModel;
        if (!self.usuallyShow) {
            usuallyModel.show = NO;
        }else {
        }
    if (usuallyModel.show) {
        self.titleL.textColor = kOrangeBg;
        self.lineL.hidden = NO;
    }else {
        self.titleL.textColor = kLabel102Color;
        self.lineL.hidden = YES;
    }
    self.titleL.text = usuallyModel.content;
}
- (void)setCityModel:(CityModel *)cityModel
{
    _cityModel = cityModel;
    if (![self.cityNamed isEqualToString:cityModel.city]) {
        cityModel.show = NO;
    }else {
        cityModel.show = YES;
    }
    if (cityModel.show) {
        self.titleL.textColor = kOrangeBg;
        self.lineL.hidden = NO;
    }else {
        self.titleL.textColor = kLabel102Color;
        self.lineL.hidden = YES;
    }
    self.titleL.text = cityModel.city;
}
- (void)setCityNamed:(NSString *)cityNamed
{
    _cityNamed = cityNamed;
    XLog(@"cityNamed:%@",cityNamed);
    
}
- (void)setUsuallyShow:(BOOL)usuallyShow
{
    _usuallyShow = usuallyShow;

}
@end
